﻿using System.Web.Mvc;

namespace easyccms.WebUI.Areas.Administrator
{
    /// <summary>
    /// Administrator area registration.
    /// </summary>
    public class AdministratorAreaRegistration : AreaRegistration
    {
        /// <summary>
        /// Gets the name of the area to be registered.
        /// </summary>
        /// <returns>The name of the area to be registered.</returns>
        public override string AreaName
        {
            get
            {
                return "Administrator";
            }
        }

        /// <summary>
        /// Registers an area in an ASP.NET MVC application using the specified area's context information.
        /// </summary>
        /// <param name="context">Encapsulates the information that is required in order to register the area.</param>
        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapRoute(
                "Administrator_default",
                "Administrator/{controller}/{action}/{id}",
                new { action = "Index", id = UrlParameter.Optional }
            );
        }
    }
}
